<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('延期处理')"/>
    <!--<th:block th:include="include :: select2-css" />-->
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">
    <style>
        label {
            font-weight: bold;
        }

        @font-face {
            font-family: 'huawen';
            src: url("/fonts/huawen.woff2");
        }
    </style>
</head>

<body style="background-color: #F4F6FA;font-size: 13px;font-family:'huawen' ;font-weight: bold">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" th:object="${twfDefer}" class="form-horizontal" style="background-color: #F4F6FA">
        <input type="hidden" name="pkId" th:value="*{pkId}">
        <input type="hidden" name="wfId" th:value="*{wfId}">
        <input type="hidden" name="sendId" th:value="*{sendId}">
        <input type="hidden" name="adeptName" th:value="*{adeptName}">
        <div class="col-sm-12" style="display: flex;justify-content: center">
            <div class="col-sm-10 entering-page">
                <!--    延期申请    -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">审核窗口-延期申请</h4>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">工单编号：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[*{workFormNo}]]</span>
                        </div>
                        <label class="col-sm-3 control-label ">派单单位：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{sdeptName}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">工单主题：</label>
                        <div class="col-sm-8">
                            <span class="tworkformprocess-span">[[${topic}]]</span>
                        </div>
                    </div>
                </div>
                <!--内容描述：-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">内容描述：</label>
                        <div class="col-sm-8">
                                <div id="fmContent">[[${fmContent}]] </div>
                        </div>
                    </div>
                </div>
                <!--办理要求-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">办理要求：</label>
                        <div class="col-sm-8">
                            <div id="fmContent">[[${sendDesc}]] </div>
                        </div>
                    </div>
                </div>
                <!--延期理由-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">延期理由：</label>
                        <div class="col-sm-8">
                            <div id="fmContent">[[${delayRn}]] </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">申请单位：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[*{adeptName}]]</span>
                        </div>
                        <label class="col-sm-3 control-label ">申请人：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[${auserName}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label entering-pd" style="color: #FF812E">原办理期限：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{#dates.format(limitOld,'yyyy-MM-dd HH:mm:ss')}]]</span>
                        </div>
                        <label class="col-sm-2 control-label " style="color: #FF1A0B">延期至：</label>
                        <div class="col-sm-3">
                            <input type="text" name="delayTo" th:field="*{delayTo}" class="form-control postpone"
                                   id="postpone"
                                   placeholder="请输入时间">
                            <div class="input-group-append " style="position: absolute;top: 12px;right: 30px;">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label ">审核人：</label>
                        <div class="col-sm-3">
                            <input type="text" name="chkUserName" th:value="*{chkUserName}"
                                   class="form-control">
                            <input type="hidden" name="chkUserNo" th:value="*{chkUserNo}">
                        </div>
                        <label class="col-sm-2 control-label ">审核时间：</label>
                        <div class="col-sm-3">
                            <input type="text" name="checkTime" class="form-control" id="checkTime"
                                   placeholder="请输入时间" readonly UNSELECTABLE="on">
                            <div class="input-group-append " style="position: absolute;top: 12px;right: 30px;">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-12">
                    <div class="form-group col-sm-12">
                        <label class="col-sm-2 control-label" style="color: red">审核意见：</label>
                        <div class="col-sm-3">
                            <select id="txtchkDesc" onchange="dropChgSendTextOnly(this,'chkDesc');"
                                    class="form-control m-b phoneCategory">
                                <option value="">-请选择-</option>
                                <option value="10">描述不详细</option>
                                <option value="20">理由不充分</option>
                                <option value="99">其他</option>
                            </select>
                            <textarea id="chkDesc" name="chkDesc" maxlength="3500"
                                      class="form-control opinion"
                                      rows="3"
                                      style="height: 130px"></textarea>
                        </div>
                        <label class="col-sm-2 control-label" style="color: red">审核备注：</label>
                        <div class="col-sm-3">
                        <textarea name="chkRemark" maxlength="3500"
                                  class="form-control opinion"
                                  rows="3"
                                  style="height: 130px"></textarea>
                        </div>
                    </div>
                </div>
                <!--按钮-->
                <div class="col-sm-12" style="display: flex;justify-content: space-around;margin-bottom: 20px;">
                    <div class="col-sm-4 col-xs-6" style="display: flex;justify-content: space-evenly;">
                        <button type="button" class="btn btn-info" onclick="btnChkClick(21)">同意</button>
                        <button type="button" class="btn btn-success" onclick="btnChkClick(22)">不同意</button>
                        <button type="button" class="btn btn-light" onclick="closeItem()">关闭</button>
                        <input type="hidden" name="deferState" id="deferState">
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/js/extension.js}"></script>

<script>
    var prefix = ctx + "system/mInterior";
    $(function () {
        $('#checkTime').val(DateToStr());
    })

    function btnChkClick(flag) {
        var text = $('#txtchkDesc option:selected').text();
        if (flag == 21) {
            if (text != null && text != '') {
                $('#chkDesc').val(text);
            }else {
                $('#chkDesc').val("同意");
            }
        } else {
            if (text != null && text != '') {
                $('#chkDesc').val(text);
            }else {
                $('#chkDesc').val("不同意");
            }
        }
        $('#deferState').val(flag);
        if ($.validate.form()) {
            let data = $('#form-user-add').serializeArray();
            $.operate.saveTab(prefix + "/cmnFile/tDeferCheckJson", data);
        }
    }
</script>
</body>
</html>

